package cn.itcast.day05.demo05;

public class targetArray {

    public static void main(String[] args) {
        Person[]array =new Person[3];

        Person one = new Person("迪丽热巴",18);
        Person two = new Person("古力娜扎",28);
        Person three = new Person ("腾格尔",58);

        array[0]=one;
        array[1]=two;
        array[2]=three;

        System.out.println(array[0]);
        System.out.println(array[1]);
        System.out.println(array[2]);

        System.out.println(array[1].getName());
    }
}
